package com.neuedu.gui;

import javax.swing.*;
import javax.swing.border.Border;
import java.awt.*;

public class MyBorderLayoutRootPanel extends JPanel {
    public MyBorderLayoutRootPanel() {
        //设置布局管理器未 BorderLayout
        this.setLayout(new BorderLayout());
        this.setBackground(Color.PINK);


        //设置组件 ， 默认中 center ，
        Button north = new Button("NORTH");
        north.setPreferredSize(new Dimension(1,30));
        this.add(north,BorderLayout.NORTH);
        this.add(new Button("SOUTH"),BorderLayout.SOUTH);
        this.add(new Button("WEST"),BorderLayout.WEST);
        this.add(new Button("EAST"),BorderLayout.EAST);
        this.add(new Button("CENTER"),BorderLayout.CENTER);


    }
}
